/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dp.vo;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author ylz
 */
@Entity
@Table(name = "news_snroom")
//@NamedQueries({@NamedQuery(name = "NewsSnroom.findAll", query = "SELECT n FROM NewsSnroom n"), @NamedQuery(name = "NewsSnroom.findBySn", query = "SELECT n FROM NewsSnroom n WHERE n.sn = :sn"), @NamedQuery(name = "NewsSnroom.findBySpcode", query = "SELECT n FROM NewsSnroom n WHERE n.spcode = :spcode")})
public class NewsSnroom implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "sn")
    private String sn;
    @Column(name = "roomnumber")
    private String roomnumber;
    @Column(name = "telphone")
    private String telphone;
    @Column(name = "spcode")
    private String spcode;
    @Column(name = "rfloor")
    private String rfloor;
    
    public NewsSnroom() {
    }

    public NewsSnroom(String sn) {
        this.sn = sn;
    }

    public String getSn() {
        return sn;
    }

    public void setSn(String sn) {
        this.sn = sn;
    }

    public String getRoomnumber() {
        return roomnumber;
    }

    public void setRoomnumber(String roomnumber) {
        this.roomnumber = roomnumber;
    }

	public String getTelphone() {
        return telphone;
    }

    public void setTelphone(String telphone) {
        this.telphone = telphone;
    }

    public String getSpcode() {
        return spcode;
    }

    public void setSpcode(String spcode) {
        this.spcode = spcode;
    }

    public String getRfloor() {
        return rfloor;
    }

    public void setRfloor(String rfloor) {
        this.rfloor = rfloor;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (sn != null ? sn.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the sn fields are not set
        if (!(object instanceof NewsSnroom)) {
            return false;
        }
        NewsSnroom other = (NewsSnroom) object;
        if ((this.sn == null && other.sn != null) || (this.sn != null && !this.sn.equals(other.sn))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.dp.vo.NewsSnroom[sn=" + sn + "]";
    }

}
